#include <stdio.h>
#include <stdlib.h>

int main()
{
    const char *food1="a&b"; //指向字符串字面值的指针不能用来修改字符串的内容，因为字符串存储在常量区，这里a&b存储在常量区

    char food2[]="a&d";//载入的时候a&d首先会保存到常量区，然后为数组分配空间，把a&d内容复制到栈上为数组赋值

    printf("food1 is %s \n", food1);
    //*(food1+2)='c'; wrong!
    printf("food1 is %s \n", food1);


    printf("food2 is %s \n", food2);
    food2[2]='c';
    printf("food2 is %s \n", food2);

    return 0;
}
